Skip to content

Use language-specific option for metamodel loading when using emf-model language#2845

Open
tsaglam wants to merge 17 commits intodevelopfrom
feature/emf-language-options
Open

Use language-specific option for metamodel loading when using emf-model language#2845
tsaglam wants to merge 17 commits intodevelopfrom
feature/emf-language-options

Conversation

@tsaglam
Copy link
Copy Markdown
Member

@tsaglam tsaglam commented Mar 1, 2026

This PR replaces the clunky order-based mechanism to ensure metamodel files are loaded before parsing model files. This is done by introducing a language-specific option, which allows specifying one or more paths to .ecore files. As a consequence, the emf-model language no longer requires a submission order. As this is the only language that uses this feature, we can remove it. The corresponding methods in the Language interface are marked as deprecated.

While the prototypical DynamicEmfLanguage was never available in the CLI, it was available via the API. With this PR it is removed and only a deprecation placeholder remains. The EmfModelLanguage now depends on EMFLanguage instead of the DynamicEmfLanguage. All functionality that is still required is moved to the EmfModelLanguage.

Partly solves #576.

Work in progress, tasks left to do:

  • Add more unit tests, especially regarding the metamodel path option.
  • Adapt the readme to show how to specify metamodel files.
  • Test if the language-specific option works with the jar.
  • Decide if the EMF dynamic maven module and Language interface should be removed now or in a later release.

For release notes:

  • EMF model language: Uses now the --metamodel CLI option to specify metamodel path(s) when loading the metamodel for EMF-based models.
  • Breaking change: Deprecate the submission order functionality of JPlag languages.
  • Deprecate the experimental dynamic EMF language, which was never available in the CLI.

@tsaglam tsaglam added enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change language PR / Issue deals (partly) with new and/or existing languages for JPlag question A question, so neither a bug nor a enhancement proposal. labels Mar 1, 2026
@tsaglam tsaglam requested a review from Copilot March 1, 2026 15:56

This comment was marked as outdated.

@tsaglam tsaglam removed the question A question, so neither a bug nor a enhancement proposal. label Mar 19, 2026
@tsaglam
Copy link
Copy Markdown
Member Author

tsaglam commented Mar 21, 2026

@robinmaisch, this PR deprecates a few methods of the public API. Is the next release set to be a major one? I could either remove these methods directly or just deprecate them for now. Any preferences?

This comment was marked as outdated.

@tsaglam tsaglam force-pushed the feature/emf-language-options branch from 51122dd to d8e99fa Compare April 12, 2026 13:17
@sonarqubecloud
Copy link
Copy Markdown

@tsaglam tsaglam requested a review from a team April 12, 2026 13:23
@tsaglam tsaglam marked this pull request as ready for review April 12, 2026 13:28
@jplag jplag deleted a comment from sonarqubecloud bot Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Issue/PR that involves features, improvements and other changes language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants